<?php

namespace app\common\business;

use app\common\lib\Str;
use think\facade\Cache;
use think\Exception;

class Classwork
{
    public $classworkObj = null;

    public function __construct()
    {
        $this->classworkObj = new \app\common\model\Classwork();
    }

    public function one_classwork($id)
    {
        return $this->classworkObj->find($id);
    }

    public function classwork($data)
    {
        return $this->classworkObj->classwork($data);
    }

    public function add_classwork($data)
    {
        $this->classworkObj->save($data);
    }

    public function del_classwork($id)
    {
        $this->classworkObj::destroy($id);;
    }

    public function edit_classwork($data)
    {
        $this->classworkObj::update($data);
    }

}